﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using NLBS.Entity;
using System.Text;
using NLBS.Views;
using System.Collections.Generic;
using NLBS.Data;
using NLBS.Web;

namespace NLBS.Control
{
    public partial class trackBack : BaseUserControl, ITrackBackView
    {
        #region Presenter

        private TrackBackPresenter _presenter;

        public TrackBackPresenter Presenter
        {
            get
            {
                if (this._presenter == null)
                    _presenter = new TrackBackPresenter();
                this._presenter.View = this;
                return _presenter;
            }
        }

        #endregion 






 

        #region IErrorView Members

        public void ShowErrorMsg(string error)
        {
            
        }
        private string _errorMsg;
        public string ErrorMsg
        {
            get
            {
                return _errorMsg;
            }
            set
            {
               _errorMsg=value;
            }
        }

        public string[] ErrorMsgs
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion

        #region ITrackBackView Members

        private List<TrackBack> _tblist;
        public List<TrackBack> tbList
        {
            get
            {
                return _tblist;
            }
            set
            {
                _tblist = value;
            }
        }

        private int _catID;
        public int catID
        {
            get
            {
                return RequestWrapper.GetQueryInt("cat");
            }
            set
            {
                _catID = value;
            }
        }
        private int _logID;
        public int logID
        {
            get
            {
                return RequestWrapper.GetQueryInt("id");
            }
            set
            {
                _logID = value;
            }
        }

        private string _pageUrl;
        public string pageUrl
        {
            get
            {
                return _pageUrl;
            }
            set
            {
                _pageUrl = value;

                AspNetPager1.EnableUrlRewriting = true;
                AspNetPager1.UrlRewritePattern = _pageUrl;

            }
        }

        public string q
        {
            get { return RequestWrapper.GetQueryString("q"); }
        }

        private int _startIndex;
        public int startIndex
        {
            get
            {
                return _startIndex;
            }
            set
            {
                _startIndex = value;
            }
        }
        private int _pageSize;
        public int pageSize
        {
            get
            {
                return _pageSize;
            }
            set
            {

                _pageSize = value;
            }
        }

        #endregion
    }
}